package br.edu.unilasalle.simon_api.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import br.edu.unilasalle.simon_api.dao.IClienteDao;
import br.edu.unilasalle.simon_api.dao.IGenericDao;
import br.edu.unilasalle.simon_api.domain.Cliente;
import br.edu.unilasalle.simon_api.service.IClienteService;

@Service
public class ClienteService extends GenericService<Cliente, Long> implements IClienteService {
	
	@Autowired
	private IClienteDao dao;
	
	public IClienteDao getClienteDao() {
		return dao;
	}
	
	public void setClienteDao(IClienteDao dao) {
		this.dao = dao;
	}

	@Override
	public IGenericDao<Cliente, Long> getEntityDao() {
		return this.dao;
	}
    
	@Override
	public List<Cliente> findAllCliente() {
		return this.dao.findAllCliente();
	}

	@Override
	public List<Cliente> findAllByNomeOrSobrenome(String param) {
		return this.dao.findAllByNomeOrSobrenome(param);
	}
	
}
